import { $get, $post, $del, $postFormData, $postJSON, $put } from "./myAxios.js";

var prefix = import.meta.env.VITE_API_PREFIX


export function apiSubmitPersonInfoPrePay(plainObj) {
  /*
   * 
   * {
  "name": "张三",
  "sex": 0,0男,1女
  "type": 1,历法类型:1公历 0农历
  "year": 1990
  "month": 1990
  "day": 1990
  "hours": 1990
  "minutes": 1990,
  province: "北京",
  city: "北京",
      }
  */
  return $postJSON(prefix + "/paipan_prepay", plainObj);
}

export function apiGetInfo(plainObj) {
  console.log('======plainObj', plainObj);
  //只需传{id:12}
  return $get("/bazi_api/paipan", { id: plainObj.meta });
}

export function apiGetInfo32(plainObj) {
  //只需传{id:12}
  return $get("/bazi_api/paipan", { id: 32 });
}



async function sleep() {
  return new Promise((res) => {
    setTimeout(() => {
      res()
    }, 3000)
  })
}

